<#include "/WEB-INF/views/default/frame/_layout.ftl"/>
<@layout page_tab="weixinLogin">


<div class="ibox">
    <div class="ibox-title">
    	<h3 class="text-center">微信扫码登入</h3>
    </div>
    <div class="ibox-content text-center">
		<img src="/funs/upload/ghy/login/QR.jpg"></img>
	</div>
</div>
<script>
	$(function(){
		setTimeout("weLogin()", 1000);
	})
	
	function weLogin() {
		var data = common_ajax.ajaxFunc("${basePath}/weixinbot/weLogin","", "json");
		var result = data;
		if (result != null) {
			if(data instanceof Object) {
    		} else {
    			//将字符串返回值转换为json类型
    			result = eval("("+ data +")");
    		}
		}
		if (result.code == "200"){
			location.replace("${basePath}/weixinbot/loginUserInfo");
		} else {
			setTimeout("weLogin()", 500);
			
		}
		
	}
</script>
</@layout>

